package com.eastfair.venuebooking.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.venuebooking.dto.*;
import com.eastfair.venuebooking.entity.Space;
import com.eastfair.venuebooking.vo.SpaceVO;
import com.eastfair.venueservice.dto.ServiceBookingDTO;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.List;

/**
 * <p>
 * 业务接口
 * 场地表
 * </p>
 *
 * @author linan
 * @date 2022-06-08
 */
public interface SpaceService extends SuperService<Space> {


    IPage<SpaceVO> querySpaceList(PageParams<SpacePageQuery> params);

    /**
     * 查询场地标签.
     *
     * @return the list
     */
    List<String> listTags();

    /**
     * 展厅名称查询展厅.
     *
     * @param spaceName the space name
     * @return the by space name
     */
    SpaceVO getBySpaceName(String spaceName);

    Boolean  saveSpaceInfo(SpaceSaveDTO spaceSaveDTO);

    /**
     * 批量保存场地.
     *
     * @param list the list
     * @return the boolean
     */
    boolean saveBatch(List<SpaceSaveDTO> list);

    Boolean  updateSpaceInfo(SpaceUpdateDTO SpaceUpdateDTO);


    Boolean  delSpaceInfoById(SpaceUpdateDTO SpaceUpdateDTO);

    SpaceVO  getSpaceById(Long id);

    /**
     * 展会同步回调
     * @param ids ids
     * @return Boolean
     */
    Boolean syncCallback(List<Long> ids);

    /**
     * 查询未同步的所有展厅
     * @return List<SpaceVO>
     */
    List<SpaceVO> queryNeedSyncSpace();

    List<Space>  getSpaceList(SalesAnalysisDTO salesAnalysisDTO);

    /**
     * 导入展厅.
     *
     * @param file the file
     * @throws IOException the io exception
     */
    boolean importSpace(MultipartFile file) throws IOException;

    /**
     * 获取展厅导入模版.
     *
     * @param response the response
     */
    void getImportTemplate(HttpServletResponse response) throws Exception;
}
